package org.example.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@Controller
@RequestMapping(value = "/")
public class IndexController {
    @GetMapping("/")
    public String index(Model view) {
        view.addAttribute("title","宏愿");
        return "index";
    }

    @PostMapping("upload")
    @ResponseBody
    public String uploadChunkFile(@RequestParam(value = "files", required = false) MultipartFile file) {
        return "成功了";
    }
}
